import React from 'react';
import { useParams, useSearchParams } from 'react-router-dom';

export default function Detail() {
  const {id } = useParams();
  const [search] = useSearchParams();
  const title = search.get('title');
  const content = search.get('content');

  return (
    <ul>
      <li>ID: {id}</li>
      <li>Title: {title}</li>
      <li>Content: {content}</li>
    </ul>
  )
}
